import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
// import Home from '../views/Home.vue'

const routes = [{
		path: '/',
		name: 'Index',
		component: () => import("@/views/Index"),
		children: [{
				path: '/jigsaw',
				name: 'Jigsaw',
				component: () => import('../views/Jigsaw.vue'),
			},
			{
				path: '/blindBox',
				name: 'BlindBox',
				component: () => import('../views/BlindBox.vue'),
			},
			{
				path: '/user',
				name: 'User',
				component: () => import('../views/User.vue'),
			},
			{
				path: '/shouye',
				name: 'Shouye',
				component: () => import('../views/Shouye.vue'),
			}
		]
	},
	{
		path: '/login',
		name: 'Login',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import('../views/Login.vue')
	},
	{
		path: '/add',
		name: 'Add',
		component: () => import('@/views/Add')
	},
	{
		path: '/fenxiang',
		name: 'FenXiang',
		component: () => import('@/views/fenxiang')
	},
	{
		path: '/jifenjilu',
		name: 'JiFenJiLu',
		component: () => import('@/views/JiFenJiLu')
	}
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
